#cmake_minimum_required(VERSION 2.8)
#cmake_policy(SET CMP0015 OLD)

set(libname "ubuntu")
#set out put path
SET(LIBRARY_OUTPUT_PATH ../game_lib)
SET(EXECUTABLE_OUTPUT_PATH ../game_exe)

PROJECT (chat_server)
MESSAGE(STATUS "building chat_server"${chat_server_BINARY_DIR})
SET(CMAKE_BUILD_TYPE DEBUG)
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

INCLUDE_DIRECTORIES(../include)
AUX_SOURCE_DIRECTORY(./ DIR_SRCS)
ADD_SUBDIRECTORY(../net objs/net) 
ADD_SUBDIRECTORY(../common objs/common)

LINK_DIRECTORIES(../libfor${libname})
MESSAGE("Linking libs ${libname}")

ADD_EXECUTABLE(chat_server ${DIR_SRCS})
ADD_DEPENDENCIES(chat_server net common)
TARGET_LINK_LIBRARIES(chat_server net common libgflags.so libglog.so libtinyxml.a)


